import request from 'utils/request'

/*
    订单相关api
*/

//订单列表
export const orderList = params => request.post("/p/order/list", params)

//删除订单
export const removeOrder = params => request.post("/p/order/removeOrder", params)

//提醒发货
export const sendSiteMsg = params => request.post("/p/order/remindDeliver", params)

// 确认收货
export const orderReceive = params => request.post("/p/order/confirmReceive", params)

//取消订单
export const cancleOrder = params => request.post("/p/order/cancelOrder", params)

//查看物流
export const orderLogistics = params => request.post("/p/order/queryLogistics", params)

//查看物流(积分商品)
export const integralLogistics = params => request.post("/p/app/integral/order/logistics", params)

//订单详情
export const myOrderDetail = params => request.post("/p/order/detail", params)


//订单流水获取订单信息
export const successOrderDetail = params => request.post("/p/successOrderDetail", params)


//再来一单
export const buyAgain = params => request.post("/p/order/addAnotherSub", params)

//激活质保卡
export const warrantyCardActivated = params => request.post("/p/warrantyCard/activated", params)

// 查看质保卡
export const warrantyCardDetail = params => request.post("/p/warrantyCard/detail", params)

//去往激活质保卡页面
export const toActivated = params => request.post("/p/warrantyCard/toActivated", params)

export const warrantyCardList = params => request.post("/p/warrantyCard/list", params)

// 自提点列表
export const sinceMentionList = params => request.get("/p/sinceMentionList", params)

// 提货凭证
export const sinceMentionVoucher = subNumber => request.get(`/p/sinceMention/voucher/${subNumber}`)

// 自己的自提点
export const assignedSinceMentionPoint = params => request.get("/p/assignedSinceMentionPoint", params)

// 判断拼团活动是否存在
export const orderListTabDisplay = params => request.get("/orderListTabDisplay", params)

// 判断订单是否过了售后期
export const afterSaleHasReturnValidPeriod = params => request.get("/p/order/afterSale/hasReturnValidPeriod", params)
